package com.pateo.springcloudgoods.web.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.NotBlank;

import javax.validation.constraints.Size;

@ApiModel("商品对象")
@Data
public class GoodsRequest {

    @ApiModelProperty("商品id(新增-置空，更新-必填)")
    private Long id;

    @NotBlank
    @Size(max = 80,message = "商品名称不能超过80")
    @ApiModelProperty("商品名称(必填)")
    private String name;

    @NotBlank
    @Size(max = 80,message = "商品类型不能超过40")
    @ApiModelProperty("商品类型(必填)")
    private String type;

    @Size(max = 20,message = "商品颜色不能超过20")
    @ApiModelProperty("商品颜色")
    private String color;

    @Size(max = 10,message = "商品品牌不能超过10")
    @ApiModelProperty("商品品牌")
    private String brand;
}
